// _compoments/videoAniView/videoAniView.js
const app = getApp();

Component({
        /**
         * 组件的属性列表
         */
        properties: {
                aniImageSrc: {
                        type: String,
                        value: 'https://morefun-active-1.oss-cn-shanghai.aliyuncs.com/2022_lamer_cream_show/room5/get-a-box.png'
                },
        },

        /**
         * 组件的初始数据
         */
        data: {
                baseUrl: app.globalData.baseUrl,
                isVideoPlaying: true,
                isPhotoShouldHide: false
        },

        /**
         * 组件的方法列表
         */
        methods: {
                onVideoUpdte(e) {
                        this.setData({
                                isVideoPlaying: true,
                        })
                },

                onVideoWaiting() {
                        console.log("onVideoWaiting   //////");
                        this.setData({
                                isVideoPlaying: false,
                        })
                },

                onVideoPlay() {
                        console.log("onVideoPlay   =======")
                        this.setData({
                                isVideoPlaying: true,
                        })
                },

                onSkipClick() {
                        this.onVideoEnded();
                },

                onVideoEnded() {
                        console.log("video   end   ")
                        this.triggerEvent("onVideoAniFinish")
                },
        }
})
